/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fgv.erp.modelo;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author adao
 */
@Entity
@Table(name = "Interesse")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Interesse.findAll", query = "SELECT i FROM Interesse i"),
    @NamedQuery(name = "Interesse.findByInteresse", query = "SELECT i FROM Interesse i WHERE i.interesse = :interesse"),
    @NamedQuery(name = "Interesse.findByCidade", query = "SELECT i FROM Interesse i WHERE i.cidade = :cidade"),
    @NamedQuery(name = "Interesse.findByDataInterese", query = "SELECT i FROM Interesse i WHERE i.dataInterese = :dataInterese"),
    @NamedQuery(name = "Interesse.findByEmail", query = "SELECT i FROM Interesse i WHERE i.email = :email"),
    @NamedQuery(name = "Interesse.findByNome", query = "SELECT i FROM Interesse i WHERE i.nome = :nome"),
    @NamedQuery(name = "Interesse.findByRespondido", query = "SELECT i FROM Interesse i WHERE i.respondido = :respondido"),
    @NamedQuery(name = "Interesse.findByTelefone", query = "SELECT i FROM Interesse i WHERE i.telefone = :telefone"),
    @NamedQuery(name = "Interesse.findByImovelImovel", query = "SELECT i FROM Interesse i WHERE i.imovelImovel = :imovelImovel")})
public class Interesse implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "interesse")
    private Long interesse;
    @Size(max = 255)
    @Column(name = "cidade")
    private String cidade;
    @Column(name = "dataInterese")
    @Temporal(TemporalType.DATE)
    private Date dataInterese;
    // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="E-mail inválido")//if the field contains email address consider using this annotation to enforce field validation
    @Size(max = 255)
    @Column(name = "email")
    private String email;
    @Lob
    @Size(max = 65535)
    @Column(name = "mensagem")
    private String mensagem;
    @Size(max = 255)
    @Column(name = "nome")
    private String nome;
    @Column(name = "respondido")
    private Boolean respondido;
    @Size(max = 255)
    @Column(name = "telefone")
    private String telefone;
    @Column(name = "imovel_imovel")
    private BigInteger imovelImovel;

    public Interesse() {
    }

    public Interesse(Long interesse) {
        this.interesse = interesse;
    }

    public Long getInteresse() {
        return interesse;
    }

    public void setInteresse(Long interesse) {
        this.interesse = interesse;
    }

    public String getCidade() {
        return cidade;
    }

    public void setCidade(String cidade) {
        this.cidade = cidade;
    }

    public Date getDataInterese() {
        return dataInterese;
    }

    public void setDataInterese(Date dataInterese) {
        this.dataInterese = dataInterese;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMensagem() {
        return mensagem;
    }

    public void setMensagem(String mensagem) {
        this.mensagem = mensagem;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public Boolean getRespondido() {
        return respondido;
    }

    public void setRespondido(Boolean respondido) {
        this.respondido = respondido;
    }

    public String getTelefone() {
        return telefone;
    }

    public void setTelefone(String telefone) {
        this.telefone = telefone;
    }

    public BigInteger getImovelImovel() {
        return imovelImovel;
    }

    public void setImovelImovel(BigInteger imovelImovel) {
        this.imovelImovel = imovelImovel;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (interesse != null ? interesse.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Interesse)) {
            return false;
        }
        Interesse other = (Interesse) object;
        if ((this.interesse == null && other.interesse != null) || (this.interesse != null && !this.interesse.equals(other.interesse))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.fgv.erp.modelo.Interesse[ interesse=" + interesse + " ]";
    }
    
}
